import request from '@/utils/request'

// 查询套餐审核列表
export function listTodoTask(query) {
  return request({
    url: '/business/audit/toduTaskList',
    method: 'get',
    params: query
  })
}

// 查询套餐审核详细
export function getAudit(id) {
  return request({
    url: '/business/audit/' + id,
    method: 'get'
  })
}

// 新增套餐审核
export function addAudit(data) {
  return request({
    url: '/business/audit',
    method: 'post',
    data: data
  })
}

// 修改套餐审核
export function updateAudit(data) {
  return request({
    url: '/business/audit',
    method: 'put',
    data: data
  })
}

// 删除套餐审核
export function delAudit(id) {
  return request({
    url: '/business/audit/' + id,
    method: 'delete'
  })
}

// 查看流程图
export function getProcessImg(instanceId) {
  return request({
    url: '/business/audit/processImg/' + instanceId,
    method: 'get'
  })
}

// 流程撤销 processCancel
export function processCancel(id) {
  return request({
    url: '/business/audit/' + id,
    method: 'delete',
    headers:{"cmd":"processCancel"}
  })
}

// 查询历史任务审批集合  
export function getHistoryTaskList(instanceId) {
  return request({
    url: '/business/audit/historyTaskList/' + instanceId,
    method: 'get',
  })
}

// 查询已办任务列表 listDoneTask
export function listDoneTask(query) {
  return request({
    url: '/business/audit/doneTaskList',
    method: 'get',
    params: query
  })
}
